package com.bike.modules.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
    * 订单主表
    */
@ApiModel(value="订单主表")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "bike_order")
public class Order implements Serializable {
    /**
     * 订单id
     */
    @TableId(value = "id", type = IdType.INPUT)
    @ApiModelProperty(value="订单id")
    private Integer id;

    /**
     * 订单号
     */
    @TableField(value = "order_no")
    @ApiModelProperty(value="订单号")
    private Long orderNo;

    /**
     * 用户id
     */
    @TableField(value = "user_id")
    @ApiModelProperty(value="用户id")
    private Integer userId;

    /**
     * 单车id
     */
    @TableField(value = "bike_no")
    @ApiModelProperty(value="单车id")
    private String bikeNo;

    /**
     * 使用时间（分钟）
     */
    @TableField(value = "`time`")
    @ApiModelProperty(value="使用时间（分钟）")
    private Integer time;

    /**
     * 费用
     */
    @TableField(value = "cost")
    @ApiModelProperty(value="费用")
    private BigDecimal cost;

    /**
     * 支付类型,1-微信支付,2支付宝支付3,到付
     */
    @TableField(value = "pay_type")
    @ApiModelProperty(value="支付类型,1-微信支付,2支付宝支付3,到付")
    private String payType;

    /**
     * 开始单车经度
     */
    @TableField(value = "start_lng")
    @ApiModelProperty(value="开始单车经度")
    private BigDecimal startLng;

    /**
     * 开始单车纬度
     */
    @TableField(value = "start_lat")
    @ApiModelProperty(value="开始单车纬度")
    private BigDecimal startLat;

    /**
     * 结束单车经度
     */
    @TableField(value = "end_lng")
    @ApiModelProperty(value="结束单车经度")
    private BigDecimal endLng;

    /**
     * 结束单车纬度
     */
    @TableField(value = "end_lat")
    @ApiModelProperty(value="结束单车纬度")
    private BigDecimal endLat;

    /**
     * 骑行里程
     */
    @TableField(value = "mileage")
    @ApiModelProperty(value="骑行里程")
    private BigDecimal mileage;

    /**
     * 订单备注
     */
    @TableField(value = "remark")
    @ApiModelProperty(value="订单备注")
    private String remark;

    /**
     * 订单状态，1：待支付，2：已支付
     */
    @TableField(value = "`status`")
    @ApiModelProperty(value="订单状态，1：待支付，2：已支付")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(value="创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @ApiModelProperty(value="更新时间")
    private Date updateTime;

    /**
     * 删除标记
     */
    @TableField(value = "del_flag")
    @ApiModelProperty(value="删除标记")
    private Boolean delFlag;

    @TableId(value = "star_park_id", type = IdType.INPUT)
    @ApiModelProperty(value="star_park_id")
    private Integer starParkId;

    @TableId(value = "end_park_id", type = IdType.INPUT)
    @ApiModelProperty(value="end_park_id")
    private Integer endParkId;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_ORDER_NO = "order_no";

    public static final String COL_USER_ID = "user_id";

    public static final String COL_BIKE_ID = "bike_id";

    public static final String COL_TIME = "time";

    public static final String COL_COST = "cost";

    public static final String COL_PAY_TYPE = "pay_type";

    public static final String COL_START_LNG = "start_lng";

    public static final String COL_START_LAT = "start_lat";

    public static final String COL_END_LNG = "end_lng";

    public static final String COL_END_LAT = "end_lat";

    public static final String COL_MILEAGE = "mileage";

    public static final String COL_REMARK = "remark";

    public static final String COL_STATUS = "status";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_DEL_FLAG = "del_flag";
}